package com.org.javabody.Java_to_Oracle;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBSession {

	private static final String DRIVER="oracle.jdbc.driver.OracleDriver";
	private static final String URL="jdbc:oracle:thin:@16.168.208.208:1521:testwzsi";
	private static final String USERNAME="wzcbkf";
	private static final String PWD="wzcbkf208";
	
	public static Connection getConnection(){
		Connection conn=null;
		try {
			Class.forName(DRIVER);  //一定要导入oracle中的ojdbc6.jar 不然进不去

			conn=DriverManager.getConnection(URL,USERNAME,PWD);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return conn;
	}

}
